import {Component}  from "react";

class Test2 extends Component{
     
    constructor(props){
         super(props);
     }  

    render(){
        return(
            <div>
            <h1>{this.props.title}</h1>    
             <input type='text'></input>
             <button>{this.props.name}</button>
        </div>
        )
    }
}


Test2.defaultProps = {
    name: '按钮',
    title:"默认标题"
  };


export default Test2;
